package com.design.pattern.observer.gper;/** * create by yufeng on 2021/7/5 20:20 */public class Test {    public static void main(String[] args) {        GPer gper = GPer.getInstance();        Teacher tom = new Teacher("Tom");        Teacher jerry = new Teacher("Jerry");        gper.addObserver(tom);        gper.addObserver(jerry);        //用户行为        Question question = new Question();        question.setUserName("张三");        question.setContent("观察者模式适用于哪些场景？");        gper.publishQuestion(question);    }}